<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
th,
td
{
text-align: center;
}
</style>
<body>
    <script>
        let Name ="小米手机青春PLUS"
        let price = prompt('请输入商品价格')
        let num = prompt('请输入商品数量')
        let address = prompt('请输入收货地址')
        let total =price * num
        const table =
        `<table border='1' width='600px'cellspacing='0'>
            <caption>
                <h3>订单确认</h3>
            </caption>
            <tr>
                <th>商品名称</th>
                <th>商品价格</th>
                <th>商品数量</th>
                <th>总价</th>
                <th>收货地址</th>
            </tr>
            <tr>
                <td>${Name}</td>
                <td>${price}</td>
                <td>${num}</td>
                <td>${total}</td>
                <td>${address}</td>
            </tr>
        </table>`
        document.write(table)
    </script>
</body>
</html>